This report visualizes the occurrence of oil spills within the California in 2008. Data provided by the Office of Spill Prevention and Response (OSPR) Incident Tracking Database. An interactive map is created to illustrate each individual occurrence with counties marked for orientation. The inland occurrences are then mapped onto a choropath map that demonstrates the relative frequency of occurrence by county, demarcated by a color gradient ranging from grey (low occurrence) to brown (high occurrence).
Data Citation:
Lampinen and Conway (2020) Oil Spill Incident Tracking [ds394] GIS Dataset. https://map.dfg.ca.gov/metadata/ds0394.html#ID0EUGA
Oil Spill Incident Tracking [ds394] | Oil Spill Incident Tracking [ds394] | California State Geoportal. (2020). https://gis.data.ca.gov/datasets/7464e3d6f4924b50ad06e5a553d71086_0/explore?location=36.977441%2C-119.422009%2C6.43&showTable=true
knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE)
library(tidyverse)
library(janitor)
library(here)
library(tmap)
library(sf)
library(tmaptools)
oil_spill <- read_sf(here('data', 'Oil_Spill_Incident_Tracking_[ds394]', 'Oil_Spill_Incident_Tracking_[ds394].shp')) %>%
clean_names()
ca_counties <- read_sf(here('data', 'ca_counties', 'CA_Counties_TIGER2016.shp')) %>%
clean_names() %>%
select(name)
oil_crs <- oil_spill %>%
st_transform(3857)
tmap_mode("view") #makes tmap interactive
tm_shape(ca_counties) +
tm_polygons(col = "grey40", alpha = 0.5) +
tm_borders() +
tm_shape(oil_spill) +
tm_dots(col = "tomato4") +
tm_basemap("OpenStreetMap")